<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Tutorial: Hello Dojo!</title>
    <!-- load Dojo -->
	<style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
   <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djConfig="parseOnLoad: true">
	function sendForm(){
		var res = dojo.byId("formResp");

		dojo.xhrPost({
			url: "addteam.php",
			form: dojo.byId("contenedor"),
			load: function(content){
				dojo.style(res,"display","block");
				res.innerHTML = content;
			},
			error: function(){
				res.innerHTML = "Your form could not be sent";
			}
		});
	}
        </script>
	<script>
			dojo.require("dijit.form.Form");
            dojo.require("dijit.form.Button");
            dojo.require("dijit.form.ValidationTextBox");
	</script>
	<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/>

</head>
<body class=" claro ">

	<div dojoType="dijit.form.Form" id="myForm" jsId="myForm" encType="multipart/form-data">

		  <script type="dojo/method" event="onSubmit">
		            if (this.validate()) {
		                return confirm('Form is valid, press OK to submit');
		            } else {
		                alert('Form contains invalid data.  Please correct first');
		                return false;
		            }
		            return true;
		  </script>

			<table style="border: 1px solid #9f9f9f;" cellspacing="10">
                <tr>
                    <td>
                        <label for="name">
                            Name:
                    </td>
                    <td>
                        <input type="text" id="name" name="name" required="true" dojoType="dijit.form.ValidationTextBox"
                        />
                    </td>
                </tr>
           		 <tr>
                    <td>
                        <label for="name">
                            Correo:
                    </td>
                    <td>
                        <input type="text" id="otro" name="otro" required="true" dojoType="dijit.form.ValidationTextBox"
						 regExp="[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}" 
	  						promptMessage="Enter email address." invalidMessage="Invalid Email Address."
                        />
                    </td>
                </tr>
            </table>

			<button dojoType="dijit.form.Button" type="submit" name="submitButton"
            value="Submit">
                Submit
            </button>
	 </div>

</body>
</html>
